# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
# Maintainer:
pkgname=perl-extutils-cchecker
_pkgreal=ExtUtils-CChecker
pkgver=0.10
pkgrel=2
pkgdesc="Perl module configuration-time utilities for using C headers, libraries, or OS features"
url="https://metacpan.org/release/ExtUtils-CChecker/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl-test-exception"
makedepends="perl-dev"
checkdepends="perl-test-fatal perl-module-build"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/P/PE/PEVANS/$_pkgreal-$pkgver.tar.gz"

builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="8b43c559333d14d682a00a0fa956aff8b6b4209b7b442f330f9e8573b438dcd5a2d3b86582e2aad2f974c342acee3e79785b9816cb585807dba9b448a1626d4c  ExtUtils-CChecker-0.10.tar.gz"
